//1.引入i18n 接口
import {createI18n} from 'vue-i18n'
//2.引入配置好的中英文
import localeZhCn from './languages/zh-cn'
import localEn from './languages/en'
//引入 element plus 的中英文

import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'

//3.初始化 i18n 的配置

const i18n = createI18n({
    legacy: false,
    locale: 'zh-cn',
    fallbackLocale: 'zh-cn',
    messages:{
        'zh-cn': localeZhCn,
        'en':localEn
    }
})

//element plus 的中英文配置

export const elementLocales = {
    'zh-cn':zhCn,
    'en':en
}
//4.对外输出
export default i18n